package com.cdp.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdp.common.core.domain.entity.SysFlyash;
import com.cdp.system.dto.FlyashDTO;
import com.cdp.system.dto.FlyashSecondDTO;
import com.cdp.system.dto.RawDTO;
import com.cdp.system.vo.SysFlyashSecondVO;
import com.cdp.system.vo.SysFlyashVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 粉煤灰 Mapper 接口
 */
public interface SysFlyashMapper extends BaseMapper<SysFlyash> {
    List<SysFlyash> selectFlyash(@Param("rawDTO")RawDTO rawDTO);

    /**
     * 插入粉煤灰数据
     *
     * @param grade    型号
     * @param fineness 细度
     */
    @Insert("INSERT INTO sys_flyash (grade, fineness) VALUES (#{grade}, #{fineness})")
    void insertFlyashData(@Param("grade") String grade, @Param("fineness") String fineness);

    Map<String, Object> queryFlyashMaxMin();

    List<SysFlyashVO> listMistedFlyash(FlyashDTO flyashDTO);

    List<SysFlyash> listFlyashIds( @Param("flyashIds") List<Integer> flyashIds);


    List<SysFlyashSecondVO> listMistedFlyashSecond(FlyashSecondDTO flyashSecondDTO);
}
